<template>
  <el-dialog :visible.sync="vis" title="添加用户">
    <el-form :model="form" style="width: 400px;" label-width="120px">
      <el-form-item label="用户名">
        <el-input v-model="form.name" auto-complete="off"></el-input>
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="vis = false">取 消</el-button>
      <el-button type="primary" @click="vis = false">确 定</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  props: {
    visible: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      form: {},
      vis: false
    };
  },
  watch: {
    vis(val) {
      this.$emit('update:visible', val);
    },
    visible(val) {
      this.vis = val;
    }
  }
};
</script>

<style>

</style>
